<template>
    <u-swiper :list="banners" @change="change" @click="click" :indicator="indicator" :indicatorMode="indicatorMode" circular :height="height" :keyName="keyName">
    </u-swiper>
</template>

<script>
    import USwiper from '../../uni_modules/uview-ui/components/u-swiper/props.js'
    export default {
        name: 'Banner',
        props: {
            ...USwiper.props,
            indicator: {
              type: Boolean,
              default: true
            },
            height: {
                type: [String, Number],
                default: 130
            }
        },
        data() {
            return {
                banners: []
            }
        },
        watch: {
          list: {
            handler: function(newList) {
              console.log(newList)
              this.banners = newList.map(item => {
                return {
                  ...item,
                  [this.keyName]: this.joinDomain(item[this.keyName])
                }
              })
              console.log('this.banners', this.banners)
            },
            deep: true
          }
        },
        methods: {
            change() {},
            click() {},
        }
    }
</script>

<style lang="scss" scoped>
</style>